<template>
  <div>
    <div v-for="(k,i) in arr" :key="i">
      <ul>
        <li
          v-for="(item, index) in list"
          :key="index"
          :value="getVal(item,k)"
        >
          {{ item.name }}
        </li>
      </ul>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      accept: false,
      arr: ['a','b'],
      list: [
        {
          result: "accept",
          name: "哈哈",
          val: ''
        },
        {
          result: "not accept",
          name: "张三",
          val: ''
        },
      ],
    };
  },
  methods: {
    getVal(item,k) {
      if (item.result ==='accept') {
        item.val = k
      }
      return item.val
    },
  },
};
</script>